Autoencoder
Model
$$
\begin{aligned}
x \to \boxed{\mathcal{E}(x; \phi)} \to \epsilon \to \boxed{\mathcal{G}(\epsilon; \theta)} \to \tilde{x} \\
x \to \boxed{g(x; \phi)} \to \epsilon \to \boxed{f(\epsilon; \theta)} \to \tilde{x}
\end{aligned}
$$Loss Function
$$
\begin{aligned}
&\arg\min_{\phi, \theta} \ell(x, \tilde{x}) + R(\text{Uniform}(0, 1), \epsilon) \\
&\arg\min_{\phi, \theta} \ell(x, f(g(x; \phi); \theta)) + R(\text{Uniform}(0, 1), g(x; \phi))
\end{aligned}
$$